package com.agile.leetcode.http.protocol;

/**
 * 定义request协议
 *
 * @Author:ChenZhangKun
 * @Date: 2021/5/24 21:34
 */
public class Request {
    /**
     * 编码
     */
    private byte code;
    /**
     * 命令
     */
    private String command;
    /**
     * 命令长度
     */
    private int commandLength;

    public byte getCode() {
        return code;
    }

    public void setCode(byte code) {
        this.code = code;
    }

    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    public int getCommandLength() {
        return commandLength;
    }

    public void setCommandLength(int commandLength) {
        this.commandLength = commandLength;
    }

    @Override
    public String toString() {
        return "Request{" +
                "code=" + code +
                ", command='" + command + '\'' +
                ", commandLength=" + commandLength +
                '}';
    }

    public Request(byte code, String command, int commandLength) {
        this.code = code;
        this.command = command;
        this.commandLength = commandLength;
    }

    public Request() {
    }
}
